]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
util: Adapt to ClutterCapture removal
authorBilal Elmoussaoui <belmouss@redhat.com>
Thu, 4 Jan 2024 08:18:41 +0000 (09:18 +0100)
committerMarge Bot <marge-bot@gnome.org>
Thu, 4 Jan 2024 14:17:06 +0000 (14:17 +0000)
It is not used anywhere by Mutter itself so move it here

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3088>

src/shell-util.c
src/shell-util.h

index 7c70a4bb805874ceb47b37b57161b74ca79e72c0..35d1f6fa3551e4b289ba45d0f1c2a3dd2aaab150 100644 (file)
@@ -354,13 +354,13 @@ shell_util_create_pixbuf_from_data (const guchar      *data,
 typedef const gchar *(*ShellGLGetString) (GLenum);
 
 cairo_surface_t *
-shell_util_composite_capture_images (ClutterCapture  *captures,
-                                     int              n_captures,
-                                     int              x,
-                                     int              y,
-                                     int              target_width,
-                                     int              target_height,
-                                     float            target_scale)
+shell_util_composite_capture_images (StCapture  *captures,
+                                     int         n_captures,
+                                     int         x,
+                                     int         y,
+                                     int         target_width,
+                                     int         target_height,
+                                     float       target_scale)
 {
   int i;
   cairo_format_t format;
@@ -378,7 +378,7 @@ shell_util_composite_capture_images (ClutterCapture  *captures,
 
   for (i = 0; i < n_captures; i++)
     {
-      ClutterCapture *capture = &captures[i];
+      StCapture *capture = &captures[i];
 
       cairo_save (cr);
 
index 7e1f7d88c16f4b4d13b674e0bb7234d997b06d30..8e29ec7ce1e810c98a34aeb5ad67025085415ac7 100644 (file)
 
 G_BEGIN_DECLS
 
+typedef struct _StCapture
+{
+  cairo_surface_t *image;
+  MtkRectangle rect;
+} StCapture;
+
 void     shell_util_set_hidden_from_pick       (ClutterActor     *actor,
                                                 gboolean          hidden);
 
@@ -46,13 +52,13 @@ GdkPixbuf *shell_util_create_pixbuf_from_data (const guchar      *data,
                                                int                height,
                                                int                rowstride);
 
-cairo_surface_t * shell_util_composite_capture_images (ClutterCapture  *captures,
-                                                       int              n_captures,
-                                                       int              x,
-                                                       int              y,
-                                                       int              target_width,
-                                                       int              target_height,
-                                                       float            target_scale);
+cairo_surface_t * shell_util_composite_capture_images (StCapture  *captures,
+                                                       int         n_captures,
+                                                       int         x,
+                                                       int         y,
+                                                       int         target_width,
+                                                       int         target_height,
+                                                       float       target_scale);
 
 void shell_util_check_cloexec_fds (void);